package com.yonyou.isv.demo.openapi.api.custdocdef;

import com.yonyou.isv.demo.openapi.base.module.reponse.ApiDataResponse;
import com.yonyou.isv.demo.openapi.api.BaseOpenApi;
import com.yonyou.isv.demo.openapi.api.OpenApiURL;
import org.springframework.stereotype.Component;

import java.util.HashMap;
import java.util.Map;

/**
 * @description: 自定义档案维护
 * @author: nishch
 * @create: 2021-07-22
 **/
@Component
public class CustomerdocApi extends BaseOpenApi {

    public Map<String, Object> save(Map<String, Object> params) {
        Map<String,String> reqUrlParam = new HashMap<>();
        reqUrlParam.put("custdocdefid",params.get("custdocdefid").toString());
        String url = buildGetRequestUrl(OpenApiURL.CUSTOMER_DOC_SAVE,reqUrlParam);
        ApiDataResponse apiDataResponse =  postForEntityUrl(url,params, ApiDataResponse.class);
        return getData(apiDataResponse);
    }
}
